package bmptest.bmp.common;

import org.apache.shiro.crypto.hash.Md5Hash;

/**
 * @author lyq
 * @date 2021/9/7 14:03
 * shiro md5 salt测试类
 */
public class TestShiroMD5 {

    public static void main(String[] args){
        //使用md5  202cb962ac59075b964b07152d234b70
        Md5Hash md5Hash = new Md5Hash("123");
        System.out.println(md5Hash.toHex());
        //使用md5+salt  3bda0600628823afafba9e05c25c5c73
        Md5Hash md5Hash1 = new Md5Hash("123","fdiop$ewr");
        System.out.println(md5Hash1);
        //使用md5+salt+hash散列  42c547c09d78581c4d15550b4c40f569
        Md5Hash md5Hash2 = new Md5Hash("123","fdiop$ewr",1024);
        System.out.println(md5Hash2);
        //使用md5+salt+hash散列  8dea5faaa2b98a0634570d4de36482f0
        Md5Hash md5Hash3 = new Md5Hash("123456","fdiop$ewr",1024);
        System.out.println(md5Hash3);
    }

}
